package org.jeecg.sms.controller;


import javax.annotation.Resource;
import javax.validation.Valid;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Tag;
import org.jeecg.common.api.vo.Result;
import org.jeecg.sms.model.SendSmsCodeModel;
import org.jeecg.sms.service.ISmsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短信接口
 *
 * @author qiang.zhou
 * @createtime 2023-03-14  14:19
 */
@Api(tags="短信接口")
@RestController
@RequestMapping("sms")
public class SmsController {

    @Resource
    private ISmsService smsService;

    @ApiOperation("获取短信验证码")
    @PostMapping("getSmsCode")
    public Result<?> sendSmsCode(@Valid @RequestBody SendSmsCodeModel model) {
        return smsService.sendSmsCode(model);
    }

}
